package com.bonc;

import com.taobao.pandora.boot.PandoraBootstrap;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@SpringBootApplication
public class HsfProviderApplication extends WebMvcConfigurerAdapter {

	protected final static Logger logger = LoggerFactory.getLogger(HsfProviderApplication.class);
	public static void main(String[] args) {
		// 启动 Pandora Boot 用于加载 Pandora 容器
		PandoraBootstrap.run(args);
		SpringApplication.run(HsfProviderApplication.class, args);
		// 标记服务启动完成,并设置线程 wait。防止业务代码运行完毕退出后，导致容器退出。
		PandoraBootstrap.markStartupAndWait();
		logger.info("HsfProviderApplication Server is success!");
	}

}
